import fetch from 'common/src/utils/fetch';

let api = {
    // 查询列表
    getList(data) {
        return fetch({
            url: '/api/majorservice/interFeatureResult/list',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        });
    },
    // 联动根据年级查询大类
    getMajorByGrade(data) {
        return fetch({
            url: '/api/majorservice/classPrivilege/queryMajorByGidAndTid',
            method: 'post',
            headers: { 'Content-Type': 'application/json' },
            data
          });
    },
    // 联动根据年级和大类查询志愿专业
    getSubjectByGradeAndMajor(gradeId, majorCode) {
        return fetch({
            url: 'api/commonservice/campusProfession/findProfessionByBigProfession?grade=' + gradeId + '&bigProfessionCode=' + majorCode,
            method: 'get',
            headers: {
                'Content-Type': 'application/json'
            },
        });
    },
    // 修改和录入
    update(vo) {
        return fetch({
            url: '/api/majorservice/interFeatureResult/edit',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data: vo
        });
    },
    // 导出
    export (data) {
        return fetch({
            url: '/api/majorservice/interFeatureResult/export',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        });
    },
    getReportStatus(key) {
        return fetch({
            url: `/api/majorservice/common/exportExcelResult/${key}`,
            method: 'get'
        });
    }
};
export default api;
